package com.ethanzzh.ethanzzh_xdclass.controller;

import com.ethanzzh.ethanzzh_xdclass.service.SmsService;
import com.ethanzzh.ethanzzh_xdclass.utils.SimpleResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;


@RestController
@RequestMapping("/sms")
public class SmsController {


    @Autowired
    private SmsService smsService;


    @GetMapping("/sendSms")
    public SimpleResponse sendMsg(@RequestParam("phoneNum") String phoneNum) {

        return SimpleResponse.success(smsService.sendSMS(phoneNum));
    }
}
